{% set page_name = "展示徽章" %}
{% extends "badge_base.html" %}
{% import "components/paginator.html" as paginator with context %}
{% import "components/nothing.html" as nothing with context %}
{% block badge_content %}
<style>
.col--uid {
    width: 5rem;
}
</style>
<div class="row">
  <div class="medium-12 columns">
    <div class="section">
      <div class="section__header">
          <h1 class="section__title">{{ _('有徽章的用户') }}</h1>
      </div>
      <div class="section__body no-padding">
        <div data-fragment-id="ranking">
          {% if not udocs.length %}
          {{ nothing.render('抱歉，目前没人拥有徽章。') }}
          {% else %}
          <table class="data-table">
            <colgroup>
              <col class="col--uid">
              <col class="col--user">
            </colgroup>
            <thead>
              <tr>
                <th class="col--uid">{{ _('User ID') }}</th>
                <th class="col--user">{{ _('Username') }}</th>
              </tr>
            </thead>
            <tbody>
              {%- for udoc in udocs -%}
              <tr>
                  <td class="col--uid">{{ udoc._id }}</td>
                  <td class="col--user">{{ user.render_inline(udoc,levelbadge=false) }}</td>
              </tr>
              {%- endfor -%}
            </tbody>
          </table>
          {{ paginator.render(page, upcount) }}
          {% endif %}
        </div>
      </div>
    </div>
  </div>
</div>
{% endblock %}
